package com.aidex.web.controller.biz;

import com.aidex.biz.domain.HousingInfo;
import com.aidex.biz.service.AccountInfoService;
import com.aidex.biz.service.HousingInfoService;
import com.aidex.common.core.controller.BaseController;
import com.aidex.common.core.domain.R;
import com.aidex.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 首页统计信息Controller
 *
 * @author sean
 * @email 2074844820@qq.com
 * @date 2022-10-26
 */
@RestController
@RequestMapping("/biz/bizIndexInfo")
public class IndexInfoController extends BaseController {
    @Autowired
    private AccountInfoService accountInfoService;

    @Autowired
    private HousingInfoService housingInfoService;


    /**
     * 获取统计面板相关信息
     */
//    @PreAuthorize("@ss.hasPermi('biz:bizAccountInfo:query')")
    @GetMapping("/findStatic")
    public R findStatic(HousingInfo housingInfo) {
        housingInfo.setCompanyId(SecurityUtils.getLoginUser().getUser().getCompanyId());
        return R.data(housingInfoService.getIndexInfo(housingInfo));
    }


}
